for i in range (100,999):
    if((i+1)==((int((i+1)/100))**3+((int((i+1)/10))%10)**3+(int((i+1)%10))**3)):
        print(i+1)